<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Vue中的条件渲染</title>
  <script src="../asset/js/vue.js"></script>
</head>

<body>
  <div id="app">
    <div data-if v-if='show'>
      用户名:
      <input type="text" key='username'>
    </div>
    <div v-else>
      邮箱名:
      <input type="text" key='mail'>
    </div>
    <!-- <div data-show v-show='show'>{{message}}</div> -->
  </div>
  <script>
    let vm = new Vue({
      el: '#app',
      data: {
        show: false,
        // message: 'Hello World'
      }
    })
  </script>
</body>

</html>